#include "stdafx.h"
#include "hereAndroidStateCore.h"

hereAndroidStateCore::hereAndroidStateCore(void)
:hereBaseSocket()
{
}

hereAndroidStateCore::~hereAndroidStateCore(void)
{
}

char *hereAndroidStateCore::GetAndroidTotalMemory(void)
{
	char *req = "GetTotalMem"HERE_NEWLINE_UINX;
	int bufLen = 0;

	if ( send_req(req, strlen(req)) < 0 )
		return NULL;

	bufLen = sizeof(m_shareBuf);
	ZeroMemory(m_shareBuf, bufLen);
	if ( recv_resp(m_shareBuf, bufLen) < 0)
		return NULL;

	return m_shareBuf;
}

char *hereAndroidStateCore::GetAndroidContact()
{
	char *req = "Contact"HERE_NEWLINE_UINX;
	int bufLen = 0;

	if ( send_req(req, strlen(req)) < 0 )
		return NULL;

	bufLen = sizeof(m_shareBuf);
	ZeroMemory(m_shareBuf, bufLen);
	if ( recv_resp(m_shareBuf, bufLen) < 0)
		return NULL;

	return m_shareBuf;
}
